package cn.seqdata.jpa.lookup;

import java.util.Comparator;

public enum LookupKeyvalComparator implements Comparator<LookupKeyval<?>> {
	instance;

	public static final Comparator<LookupKeyval<?>> comparator = Comparator.comparing(LookupKeyval<?>::getOrderNo,
			Comparator.nullsLast(Comparator.comparingInt(Integer::intValue)));

	@Override
	public int compare(LookupKeyval<?> o1, LookupKeyval<?> o2) {
		return comparator.compare(o1, o2);
	}
}
